package com.evildog.workspace.life.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.life.application.bo.AlbumBO;
import com.evildog.workspace.life.application.bo.AlbumPageBO;
import com.evildog.workspace.life.application.dto.AlbumDTO;
import com.evildog.workspace.life.application.dto.AlbumPageDTO;
import com.evildog.workspace.life.application.entity.Album;
import com.evildog.workspace.life.application.entity.AlbumPageDO;
import com.evildog.workspace.life.application.model.AlbumPageParam;
import com.evildog.workspace.life.application.model.AlbumParam;
import com.evildog.workspace.life.application.vo.AlbumPageVO;
import com.evildog.workspace.life.application.vo.AlbumVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface AlbumConvert {

    AlbumConvert INSTANCE = Mappers.getMapper(AlbumConvert.class);

    AlbumPageDTO convert(AlbumPageParam albumPageParam);

    AlbumDTO convert(AlbumParam albumParam);

    @Mapping(target = "isDeleted", ignore = true)
    Album convert(AlbumDTO albumDTO);

    AlbumPageDO convert(AlbumPageDTO albumPageDTO);

    AlbumVO convert(AlbumBO albumBO);

    AlbumBO convert(Album album);

    @Mappings({})
    PagedResult<AlbumPageBO> convert(IPage<AlbumPageDO> page);

    PagedResult<AlbumPageVO> convert(PagedResult<AlbumPageBO> page);
}